package com.starview.star.compiler.generate;

import com.starview.platform.data.type.IType;
import com.starview.platform.data.type.Location;
import com.starview.star.compiler.canonical.Variable;
import com.starview.star.compiler.type.BindingKind;
import com.starview.star.compiler.util.AccessMode;

public class DictEntry
{
  private final String name;
  final AccessMode access;
  private final Variable var;
  private final Location loc;
  private final BindingKind where;

  public DictEntry(String name, Variable var, Location loc, AccessMode access, BindingKind where)
  {
    this.name = name;
    this.access = access;
    this.var = var;
    this.where = where;
    this.loc = loc;
  }

  public Variable getVariable()
  {
    return var;
  }

  public String getName()
  {
    return name;
  }

  public AccessMode getAccess()
  {
    return access;
  }

  public BindingKind getBindingKind()
  {
    return where;
  }

  public IType getType()
  {
    return var.getType();
  }

  public Location getLoc()
  {
    return loc;
  }
}